﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Duson.DAOSQLServer
{
    using System.Data.Common;
    using System.Data.SqlClient;
    using System.Configuration;
    using DusonFramework.DataAccess.Utility;

    public class SQLServerProvider : SQLProvider
    {
        private static readonly string _connectionString = ConfigurationManager.ConnectionStrings["SQLConnectionString"].ToString();
        private static SQLProvider _provider = new SQLServerProvider();

        public static SQLHelper Instance
        {
            get { return _provider.SQLHelperInstance; }
        }

        protected override SQLHelper Create()
        {
            DbDataAdapter da = new SqlDataAdapter();
            da.SelectCommand = new SqlCommand();
            da.SelectCommand.Connection = new SqlConnection(_connectionString);

            return new SQLHelper(da);
        }

    }
}
